<template>
  <div class="all">
    <div class="top">
      <span>树懒外卖商户中心</span>
    </div>
    <div class="middle">
      <div class="content">
        <div class="middle-top">
          <div class="left">我的门店</div>
          <div class="right" @click="goRegister">新开门店</div>
        </div>
        <div class="middle-content">
          <content></content>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import {
  ref,
  reactive,
  toRefs,
  watch,
  onMounted,
  getCurrentInstance,
} from 'vue'
import content from './components/content.vue'
import useSellerRegisterStore from '@/store/modules/register'
import router from '@/router'
const goRegister = () => {
  useSellerRegisterStore().setStoreId(null)
  router.push('/cvmagic/register/store')
}

const emit = defineEmits([''])
const props = defineProps({
  propData: {
    type: String,
    default: '',
  },
})
//const { } = toRefs(props);

const { data } = toRefs(
  reactive({
    //定义数组和对象
    data: '',
  })
)
</script>
<style lang="scss" scoped>
.all {
  .top {
    width: 100%;
    height: 60px;
    background-color: #3094fa;
    text-align: center;
    line-height: 60px;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
  }
  .middle {
    width: 100vw;
    height: 100%;
    .content {
      background-color: #fff;
      padding: 20px 28px;
      overflow: auto;
      .middle-top {
        display: flex;
        justify-content: space-between;
        .right {
          width: 90px;
          height: 32px;
          background-color: #4291ff;
          text-align: center;
          line-height: 32px;
          color: #fff;
          cursor: pointer;
          opacity: 1;
          transition: all 0.8s;
        }
        .right:hover {
          opacity: 0.8;
        }
      }
      .middle-content {
        margin-top: 20px;
      }
    }
  }
}
</style>
